-
-
Notifications
You must be signed in to change notification settings - Fork 436
LND10 | Adrian Ilovan | JS1 Coursework Week2 #461
base: main
Are you sure you want to change the base?
LND10 | Adrian Ilovan | JS1 Coursework Week2 #461
Conversation
|
|
||
| if (isHappy) { | ||
| function getMood(isHappy) { | ||
| if (isHappy === true) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice using strict equality
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you :)
| let isBigEnough; | ||
|
|
||
| if (isBigEnough) { | ||
| if (num > 10) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| function isAcceptableUser(userAge, isLoggedIn) {} | ||
|
|
||
| function isAcceptableUser(userAge, isLoggedIn) { | ||
| if (userAge >= 18 && isLoggedIn === true) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perfect :)
| */ | ||
| function buyTwoGetTheCheapestFree(price1, price2) {} | ||
| function buyTwoGetTheCheapestFree(price1, price2) { | ||
| let cheaperPrice = price1 < price2 ? price1 : price2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good use of the ternary operator
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have to be honest, ChatGPT helped.
|
|
||
| function countReverse(number) {} | ||
| function countReverse(number) { | ||
| for (let i = number; i >= 1; i--) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good for loop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ta :)
|
Hi Adrian-- Nice job on this! Looks like you really understand the fundamentals well. Keep up the good work! |
Volunteers: Are you marking this coursework? You can find a guide on how to mark this coursework in
HOW_TO_MARK.mdin the root of this repositoryYour Details
Homework Details
Notes
Booleans, if statement
counting , adding i++
this function :
function printOddNumbers(limit) {
let i = 1;
while (i <= limit) {
if (i % 2 !== 0) {
console.log(i);
}
i++;
}
}